#!/usr/bin/env python
# -*- coding:utf-8 -*-


#getattr,setattr,delattr,hasattr
import home     #将home模块加载进内存
print dir(home) #打印所有包含的函数名称   ==>['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'dev', 'index']
print hasattr(home,'dev')       ==>True
print getattr(home,"dev")       ==><function dev at 0x0000000002119978>
setattr(home,"dev",lambda x:x+1)      ==>把dev改成后面的函数
delattr(home,"dev")    #删除'dev'